#include <iostream>
#include <string>
#include <vector>
size_t splite(const std::string &s, const std::string &sep, std::vector<std::string> &result)
{
    // ...new...cout..#.c
    size_t pos = s.find(sep);
    size_t i = 0;
    while (pos != std::string::npos)
    {
        if(i == pos){
            i += sep.size();
        }else{
            result.push_back(s.substr(i, pos - i));
            i = pos + 1;
        }
        pos = s.find(sep, i);
    }
    if(i < s.size()) result.push_back(s.substr(i));
    return result.size();
}

int main()
{
    std::string s = "...new...co.u.t..#.c..";
    std::vector<std::string> ret;
    splite(s, ".", ret);
    for(auto ss: ret) std::cout << ss << std::endl;
    std::cout << (int)s.find('.',s.size() + 12) <<std::endl;
    return 0;
}